/*
 * Licensed to the Tai Ping Jin Ke
 *
 * Copyright (c) 2022 .
 * All rights reserved.
 * 项目名称：呼叫中心-业务逻辑层-权限控制管理-接口定义
 * 版权说明：本软件属太平金融科技服务(上海)有限公司所有，在未获得太平金融科技服务(上海)有限公司正式授权情况下，任何企业和个人，不能获取、阅读、安装、传播本软件涉及的任何受知识产权保护的内容。
 */
package com.taiping.cc.authorize.service;

import com.taiping.cc.authorize.openfeign.fallbackfactory.AccountServiceFallbackFactory;
import com.taiping.cc.authorize.pojo.dto.AuthLoginDTO;
import com.taiping.dlt.pojo.bo.AuthLoginBO;
import com.taipingframework.boot.web.response.result.ApiResult;
import com.taipingframework.utility.exception.ServiceException;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;

@FeignClient(value = "cc-authorize-service",
        path = "/service/account",
        contextId = "accountServiceContext",
        fallbackFactory = AccountServiceFallbackFactory.class
)
public interface AccountService {

    /**
     * 禁用账户/(逻辑)删除账户
     */
    @ResponseBody
    @PostMapping(value = "/disable")
    ApiResult<Boolean> disableAccount(@RequestBody AuthLoginBO authLogin) throws ServiceException;

    /**
     * 接收用户登录认证数据
     */
    @ResponseBody
    @PostMapping(value = "/receive")
    ApiResult<Boolean> receive(@RequestBody AuthLoginDTO authLoginDTO) throws ServiceException;

    /**
     * 登录通-登录校验
     */
    @ResponseBody
    @PostMapping(value = "/valid")
    ApiResult<AuthLoginBO> valid(@RequestBody AuthLoginBO authLogin) throws ServiceException;

}
